home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / mgl / matrix.h < prev    next >
C/C++ Source or Header  |  1999-12-22  |  1KB  |  65 lines

  1. /*
  2.  * $Id: matrix.h,v 1.1.1.1 1999/12/22 12:40:15 hfrieden Exp $
  3.  *
  4.  * $Author: hfrieden $
  5.  *
  6.  * $Date: 1999/12/22 12:40:15 $
  7.  * $Revision: 1.1.1.1 $
  8.  *
  9.  * (C) 1999 by Hyperion Software
  10.  * All rights reserved
  11.  *
  12.  * This file is part of the MiniGL library project
  13.  * See the file Licence.txt for more details
  14.  *
  15.  */
  16.  
  17. #ifndef _MATRIX_H
  18. #define _MATRIX_H
  19.  
  20. typedef struct Matrix_t
  21. {
  22.     float v[16];
  23.     int flags;                  // Matrix flags
  24.     struct Matrix_t *Inverse;   // optional inverse
  25. } Matrix;
  26.  
  27. #define OF_11 0
  28. #define OF_12 4
  29. #define OF_13 8
  30. #define OF_14 12
  31.  
  32. #define OF_21 1
  33. #define OF_22 5
  34. #define OF_23 9
  35. #define OF_24 13
  36.  
  37. #define OF_31 2
  38. #define OF_32 6
  39. #define OF_33 10
  40. #define OF_34 14
  41.  
  42. #define OF_41 3
  43. #define OF_42 7
  44. #define OF_43 11
  45. #define OF_44 15
  46.  
  47.  
  48.  
  49.  
  50. #define  MGLMAT_IDENTITY         0x01
  51. #define  MGLMAT_ROTATION         0x02
  52. #define  MGLMAT_TRANSLATION      0x04
  53. #define  MGLMAT_UNIFORM_SCALE    0x08
  54. #define  MGLMAT_GENERAL_SCALE    0x10
  55. #define  MGLMAT_PERSPECTIVE      0x20
  56. #define  MGLMAT_GENERAL          0x40
  57. #define  MGLMAT_GENERAL_3D       0x80
  58. #define  MGLMAT_ORTHO            0x100
  59. #define  MGLMAT_0001             0x200
  60.  
  61. #define MGLMASK_0001 (MGLMAT_IDENTITY|MGLMAT_ROTATION|\
  62.         MGLMAT_TRANSLATION|MGLMAT_UNIFORM_SCALE|MGLMAT_GENERAL_SCALE|MGLMAT_0001)
  63.  
  64. #endif
  65.